//
//  WBDemoViewController.swift
//  ROM新浪微博
//
//  Created by 戴明亮 on 17/2/15.
//  Copyright © 2017年 戴明亮. All rights reserved.
//

import UIKit

class WBDemoViewController: WBBaseViewController {

    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        title = "第\(navigationController?.childViewControllers.count ?? 0)个"
    }
    
    // MARK: - 监听方法
    // 继续 push 一个新的控制器
    @objc  func showNext() {
        print(#function)
        
        let vc = WBDemoViewController()
        
        navigationController?.pushViewController(vc, animated: true)
        
    }
    
    
}


extension WBDemoViewController{
    
    override func setupUI() {
        super.setupUI()
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", fontSize: 16, target: self, action: #selector(showNext))
    }
    
}
